<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<c:set var="srcPath" value="${redis:getSysConfig('sysFileVisitRoot_back')}"/>
<c:set var="uploadPath" value="${redis:getSysConfig('uploadFileVisitRoot')}"/>
<script type="text/javascript">
    /**
     * 查看管理员详情
     */
    function detailInfo(id){
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: "${basePath}/back/users/getUsersObject.sjson",
            data: {usersId:id},
            success: function(result){
                var data = JSON.parse(result.data);
                /**重置详情页中所有html展示信息**/
                resetDetailTable("detailTable");
                /**设置展示信息**/
                $("#d_photo").html("<img id='uploadImg_detail_1' class='uploadImg' onMouseOver='showDetailBigImage(1,3,3,0)'  onMouseOut='showDetailRebackImage(1,1,1)' src='${uploadPath}/"+data.userPhoto+"' onerror='this.src=\"${srcPath}/common/images/mrbj.png\"' width='50px' height='50px' />");
                $("#d_userName").html(data.userName);
                var l=data.password.length;
                var str="";
                if(l>0){
                    for(var i=0;i<l;i++){
                        str+="*";
                    }
                    $("#d_password").html(str);
                }
                $("#d_trueName").html(data.trueName);
                $("#d_email").html(data.email);
                $("#d_phone").html(data.phone);
                if(data.lockState=="0"){
                    $("#d_lockState").html("<font class='color_001'>未冻结</font>");
                }else{
                    $("#d_lockState").html("<font class='color_002'>已冻结</font>");
                }
                $("#d_comments").html(data.comments);
                if(data.registerDate!=""&&data.registerDate!=undefined){
                    $("#d_registerDate").html(new Date(data.registerDate).Format("yyyy-MM-dd hh:mm:ss"));
                }
            }
        });
    }

</script>

<!--详情模态框（Modal） -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">管理员详情</h5>
			</div>
			<div class="modal-body">
				<table id="detailTable" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td" width="150px">管理员头像:</td>
						<td class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_photo"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">管理员名称:</td><td  class="toleft_td" width="250px">&nbsp;&nbsp;<span id="d_userName"></span></td>
						<td class="toright_td" width="150px">密码:</td><td  class="toleft_td" width="250px">&nbsp;&nbsp;<span id="d_password"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">真实姓名:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_trueName"></span></td>
						<td class="toright_td" width="150px">电子邮件:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_email"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">手机号码:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_phone"></span></td>
						<td class="toright_td" width="150px">冻结状态:</td><td  class="toleft_td"  colspan="3">&nbsp;&nbsp;<span id="d_lockState"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">备注:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_comments"></span></td>
						<td class="toright_td" width="150px">创建时间:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_registerDate"></span></td>
					</tr>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>